package cn.gson.boot.model.pojos;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Objects;

/*换货详情*/

@Entity
public class Huanhuoxiangqing {
    private int hhxqId;//换货详情id
    private Productt productt;//产品id
    private Integer hhcpNum;//换货产品数量
    private Huanhuo huanhuoByHhId;//换货对象（换货id）
    private BigDecimal hhcpPrice;//价格
    private BigDecimal hhcpXiaoji;//小计

    @Column(name = "hhcp_price")
    public BigDecimal getHhcpPrice() {
        return hhcpPrice;
    }

    public void setHhcpPrice(BigDecimal hhcpPrice) {
        this.hhcpPrice = hhcpPrice;
    }

    @Column(name = "hhcp_xiaoji")
    public BigDecimal getHhcpXiaoji() {
        return hhcpXiaoji;
    }

    public void setHhcpXiaoji(BigDecimal hhcpXiaoji) {
        this.hhcpXiaoji = hhcpXiaoji;
    }

    @Id
    @Column(name = "hhxq_id", nullable = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY,generator = "seq")
    public int getHhxqId() {
        return hhxqId;
    }

    public void setHhxqId(int hhxqId) {
        this.hhxqId = hhxqId;
    }




    @Basic
    @Column(name = "hhcp_num", nullable = true, precision = 0)
    public Integer getHhcpNum() {
        return hhcpNum;
    }

    public void setHhcpNum(Integer hhcpNum) {
        this.hhcpNum = hhcpNum;
    }

    @ManyToOne
    @JoinColumn(name = "productt_id", referencedColumnName = "productt_id")
    public Productt getProductt() {
        return productt;
    }

    public void setProductt(Productt productt) {
        this.productt = productt;
    }


    @ManyToOne
    @JoinColumn(name = "hh_id", referencedColumnName = "hh_id")
    public Huanhuo getHuanhuoByHhId() {
        return huanhuoByHhId;
    }

    public void setHuanhuoByHhId(Huanhuo huanhuoByHhId) {
        this.huanhuoByHhId = huanhuoByHhId;
    }
}
